package cmd

import (
	"encoding/json"
	"time"
)

func MapToJson(code int, message string, data interface{}) string {
	var ret = make(map[string]interface{})
	ret["code"] = code
	ret["message"] = message
	ret["data"] = data
	var json, _ = json.Marshal(ret)
	return string(json)

}
func Nowtime() string {
	timeObj := time.Now()
	var str = timeObj.Format("2006/01/02 15:04:05")
	return str
}
